package com.code.translate.function;

import java.io.InputStream;
import java.util.Map;

/**
 * @author ggh
 * @date 2022/10/16
 * 文档翻译
 */
public abstract class DocumentTranslatePlugin extends TextTranslatePlugin {

    public String translateDocumentByStream(InputStream inputStream) throws Exception {
        Map<String, Object> params = this.prepareDocuemnt();
        return this.doTranslateDocumentByStream(inputStream, params);
    }

    protected abstract Map<String, Object> prepareDocuemnt() throws Exception;

    public String doTranslateDocumentByStream(InputStream inputStream, Map<String, Object> params) throws Exception {
        return null;
    }

    @Override
    protected Map<String, Object> prepare() throws Exception {
        return null;
    }

    @Override
    protected String doTranslate(String text, Map<String, Object> params) throws Exception {
        return null;
    }
}
